{% extends "layout/admin.html" %}

{% block title %}修改分类{{category.name}}{% endblock %}

{% block content %}
<div class="mb10 fl"><a class="but" href="/admin/categorys">返回分类管理</a></div>
<hr>
<h1>修改分类</h1>
{%set messages=handler.get_flashed_messages() %}
{%if messages%}
    <div class="msg">
        {% for type, msg in messages%}
            <span>{{msg}}</span>
        {% endfor %}
    </div>
{%endif%}

<form action="" method="post">
	{{xsrf()}}
        <div class="form-group">
        <label>分类名</label>
        <input type="text" class="input"  name="name" maxlength="20" placeholder="最多20位" value="{{category.name}}">
        </div>
        <div class="form-group">
        <label>访问目录</label>
        <input type="text" class="input"  name="slug" placeholder="字母和数字，最多20位" value="{{category.slug}}">
        </div>
        <div class="form-group">
        <label>排序</label>
        <input type="text" class="input"  name="order" maxlength=3 size=3   value="{{category.order}}" data-var="数字，最多3位">
        </div>
        <div class="form-group">
        <input type="submit" name="sub" value="提交" class="sub">
        </div>
</form>
{% endblock %}